// 获取微信头像和用户名
export const getUserInfo = () => {
	let info = {};
	return new Promise((resolve, reject) => {
		uni.getUserProfile({
			desc: "获取头像和用户名",
			success(res) {
				uni.showToast({
					title: "哈哈哈哈",
					success() {
						let {
							avatarUrl,
							nickName
						} = res.userInfo;
						info.avatarUrl = avatarUrl;
						info.nickName = nickName;
						uni.setStorageSync("info", info);
						resolve(res);
					}
				})




			},
			fail(err) {
				reject(err);
			}
		})
	})


}
